﻿using Furion.DynamicApiController;
using HOPU.OnlineSchool.Application.Dashboard.Dtos;
using HOPU.OnlineSchool.Application.Dashboard.Services;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HOPU.OnlineSchool.Application.Dashboard
{
    public class DashboardAppService : IDynamicApiController
    {
        private readonly IDashboardService _dashboardService;

        public DashboardAppService(IDashboardService dashboardService)
        {
            this._dashboardService = dashboardService;
        }
        [AllowAnonymous]
        public async Task<EchartsDto> Get()
        {
            return await _dashboardService.GetDataSync();
        }
    }
}
